﻿//********************************************************************************//
//创建日期：<创建日期，2016-10-18>
//创建作者：<孙雪婷，sunxueting@shanghai3h.com>
//功能说明：收费管理 进入下一账务年月
//********************************************************************************//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Entity;
using BLL;
using BLL.Access;
using System.Data;
using Platform.Http;
using System.Text;
using Web.Class;

namespace Web.Pages.QuShui.DiXiaS.ZhangWuGL
{
    public partial class JinRuXYZWNY : BasePage
    {
        #region 属性

        #endregion

        #region 变量
        /// <summary>
        /// 存储过程执行类
        /// </summary>
        SpHelper _SpHelper = new SpHelper();

        /// <summary>
        /// 操作日志BLL
        /// </summary>
        SYS_LOGBLL _SYS_LOGBLL = new SYS_LOGBLL();

        /// <summary>
        /// 参数bll
        /// </summary>
        QS_CANSHUBBLL _CANSHUBLL = new QS_CANSHUBBLL();

        #endregion

        #region 事件

        /// <summary>
        /// 页面加载事件
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            //第一次页面加载
            if (!IsPostBack)
            {
                InitData();
            }
        }

    
        /// <summary>
        /// 进入下一水量年月
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnXiaYiZWNY_Click(object sender, EventArgs e)
        {
            //进入下一水量年月
            int wtype = BusinessTool.WType;
            int caozuor = LoginInfo.CurrentUser.UserID;
            int ym = Convert.ToInt32(txtV.Text);
            int zry = DateTime.Now.Year;
            int zrm = DateTime.Now.Month;
            if ((ym / 100) >= zry && (ym % 100) >= zrm)
            {
                PageTools.AlertMsg(this, "当前账务年月不能大于自然年月");
                return;
            }
            string result = "";
            _SpHelper.P_QSSF_JINRUXYZWNY(wtype, caozuor, out result);
            if (result == "1")
            {
                PageTools.AlertMsg(this, "操作成功");
            }
            txtV.Text = BusinessTool.GetSLYMorZWNY(2, wtype).ToString();
        }

        #endregion

        #region 方法

        /// <summary>
        /// 初始化数据
        /// </summary>
        private void InitData()
        {
            int wtype =BusinessTool.WType;
            txtV.Text = BusinessTool.GetSLYMorZWNY(2, wtype).ToString();

        }
        #endregion        
    }
}